import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'
import type {Router, RouteRecordRaw} from 'vue-router'

import Home from '@/view/home.vue'
import About from '@/view/about.vue'
import Layout from '@/components/layout.vue'

let routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: Layout,
    redirect: '/home',
    children: [
      {path: '/home', component: Home},
      {path: '/About', component: About},
    ]
  }
]

let router: Router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router